package com.snake.springboot.custom.service.assemble.strategy;


import com.snake.springboot.custom.api.model.strategy.AuthBuyStrategyModel;
import com.snake.springboot.custom.dao.mybatis.entity.goods.CustStryGoodsDetailDO;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>策略相关组装器
 * 类{@code StrategyAssemble} </br>
 * 创建时间2025/3/31 10:28
 * @author yangxt
 * @see
 */
public class StrategyAssemble {
    public static List<AuthBuyStrategyModel> toOpStrategyModel(List<CustStryGoodsDetailDO> list) {
        List<AuthBuyStrategyModel> models = new ArrayList<>(list.size());
        for (CustStryGoodsDetailDO detailDO : list) {
            AuthBuyStrategyModel model = new AuthBuyStrategyModel();
            model.setStrategyId(detailDO.getStrategyId());
            model.setOperator(detailDO.getCustomName());
            model.setOperatorId(detailDO.getCustomId());
            model.setDayCount(detailDO.getDayCount());
            models.add(model);
        }
        return models;
    }


}
